.. _template_tool: ========================== Create Template ========================== .. note:: The granular plugin must be :ref:`activated ` before a template can be created. This requires a `Momentum Granular `_ license. .. |SHAPE_MODEL| image:: ../images/en/ShapeModel32x32.png A |SHAPE_MODEL| **Template** is an object that is used for wrapping existing RigidBodies for usage in Body Models which used in :ref:`body distributions `, similar to radius in :ref:`particle models `. A Template is based on an *existing RigidBody* in the scene and can be created via the *Template* tool in the :ref:`Granular Ribbon `, or via the right-click context menu in Simulation Sturcture. .. note:: RigidBody used as Templates are effectivley disabled in the main simulation. .. note:: It is recommended to keep the solid that are used to create Templates in an external document reference as it will make it easier to reuse in other scene together with the :ref:`Export ` function. -------------------------------- Usage -------------------------------- Select the *Template* tool from the ribbon menu and left-click on any RigidBody. This will create a new instance of a Temlpate on the selected solid which can be found under the *Shape Library* section in the simulation structure. .. image:: ../images/en/TemplateTool.png While the Template tool is active, solids in the document will be colored according to their associated RigidBody, for easier selection: .. image:: ../images/en/TemplateToolBodyHighlight.png After RigidBodies have been selected templates, they will appear under the "TemplateLibrary" in the simulation structure: .. image:: ../images/en/TemplateSimulationStructure.png You can also create Templates by via the following actions: * Via Right-click context menu for Rigid Bodies in the simulation structure. * Via Right-click context menu for BodyGroups in the simulation structure. This will add all RigidBodies in the group as Templates. * Drag-n-drop RigidBodies or BodyGroups into the Simulation Structure TemplateLibrary. The Templates are used as a basis for the Body Models in :ref:`body distributions `. -------------------------------- Convex Detection -------------------------------- By default, convex detection is used on template geometries. This reduces the geometrical complexity of convex trimeshes for increased performance. This can become important when simulating large amount of objects which is typical in Granular applications. The settings for this can be adjusted under :ref:`Granular Settings `. The settings include the option of turning it off and also to adjust the detection/conversion threshold. .. note:: :ref:`Use Dynamics Color -> Color By Collision Shape ` to see which template solids that are converted to convex meshes.